package com.qumitech.visualnovel.service.impl;

import com.qumitech.visualnovel.datasource.console.ModuleClassConfigMapper;
import com.qumitech.visualnovel.datasource.console.SysOperationLogMapper;
import com.qumitech.visualnovel.model.dao.console.ModuleClassConfig;
import com.qumitech.visualnovel.model.dao.console.SysOperationLog;
import com.qumitech.visualnovel.service.SysOperationLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Edison.hu on 18/9/11.
 */

@Service
public class SysOperationLogServiceImpl implements SysOperationLogService{

    @Autowired
    SysOperationLogMapper sysOperationLogMapper;

    @Autowired
    ModuleClassConfigMapper moduleClassConfigMapper;

    @Override
    public int AddNewLog(SysOperationLog log){
       return sysOperationLogMapper.addNewLog(log);
    }

    @Override
    public int getSysLogCount(String username, Integer moduleId, String startTime, String endTime){

        return sysOperationLogMapper.getSysLogCount(username,moduleId,startTime,endTime);

    }

    @Override
    public List<SysOperationLog> getSysLogList(String username, Integer moduleId, String startTime, String endTime, int offset, int pageSize, String orderBy, String orderType){

        return sysOperationLogMapper.getSysLogList(username,moduleId,startTime,endTime,offset,pageSize,orderBy,orderType);
    }

    @Override
    public List<ModuleClassConfig> getAllModuleClass(){

        return moduleClassConfigMapper.getAllModuleClass();
    }


}
